<?php global $ubi; ?>
<form id="frmSendQuickMessage" method="post" action="index.php?send&type=quick_message&userid=<?php echo $user->getUserID();?>">
	<textarea rows="1" cols="72" class="quick_message" name="content"></textarea>
	<div style="text-align:right">
		<input type="submit" value="Gửi" />
	</div>
</form>

<script language="javascript">
	$('#frmSendQuickMessage').submit(function() {		
		var url = 'index.php?send&type=quick_message&userid=<?php echo $getVars['userid']?>';
		var content = $('#frmSendQuickMessage textarea[name=content]').val();
		if (content != '') {		
			$.post(url, 
				{content:content}, 
				function(data) {				
					$('#quickMessages').load('index.php?load&view=quickMessages&userid=<?php echo $getVars['userid']?>');
					$('#frmSendQuickMessage textarea[name=content]').val('');									
				}
			);
		}
		return false;
	});
</script>